# -*- coding: utf-8 -*-

#rom django.http import HttpResponse
import os
from google.appengine.ext.webapp import template
from django.template import loader, Context
from django.shortcuts import render_to_response
from DBController import *
from django.http import HttpResponse


def js_test(request):
    return HttpResponse("<h1>who's there?!</h1>")
    db_controller = DBController()
    if db_controller.general_index > -1:
        wave_catalog = db_controller.get_all()
        header = "<h1>" + db_controller.subtags[db_controller.general_index]["header"] + "</h1><br>"
        text = wave_catalog[db_controller.general_index].get_html_list()
        wave_list = header + text
    else:
        wave_list = "<h1>Database is empty!</h1>"
    section = get_object_or_404(Section, slug__exact=slug)
    t = loader.select_template(["js_te1st.html", "js_test.html",
                            "404.html"])
    return HttpResponse(t.render(wave_list))
    #return HttpResponse(wave_list)